import request from '@/utils/request'

export default {
    //条件分页查询课程
    getCoursePageList(page,limit,courseFrontInfoVo) {
        return request({
            url: `/eduservice/coursefront/getCoursePageList/${page}/${limit}`,
            method: 'post',
            data:courseFrontInfoVo
        })
    },
    //查询所有分类的方法
    getAllSubject() {
        return request({
        url: '/eduservice/edu-subject/getAllSubject',
        method: 'get'
        })
    },
    //根据课程id查询课程详细信息和课程章节信息
    getCourseFrontInfo(id) {
        return request({
            url: `/eduservice/coursefront/getCourseFrontInfo/${id}`,
            method: 'get'
        })
    },
    //根据课程名称查询课程
    searchCourse(coursename){
        return request({
            url: '/eduservice/coursefront/searchCourse/'+coursename,
            method: 'get'
        })
    }

}